<?php
/**
* Create an image <code><img></code>.
* The img element defines an image.
*/
class Img extends element
{
    function img($id=NULL, $src=NULL,$class=NULL, $alt=NULL, $label=NULL )
    {
        parent::element('img',$id, $class, $label);
        $this->addAttribute('src', $src);

        //to make W3C validation
        if (!$alt)
        {
            $alt = ' ';
        }

        $this->addAttribute('alt', $alt);
    }
}
?>